#include "studentinfo.h"

#include <QtDebug>

StudentInfo::StudentInfo()
{
    m_id.clear();
    m_name.clear();
    m_xuehao.clear();
    m_pswd.clear();
    m_sex.clear();
    m_classid.clear();
    m_RxTime.clear();
}

StudentInfo::StudentInfo(const QString &id,const QString &name,
                         const QString &xuehao,const QString &pswd,
                         const QString &sex,const QString &classid,
                         const QString &RxTime)
{
    m_id = id;
    m_name = name;
    m_xuehao = xuehao;
    m_pswd = pswd;
    m_sex =sex;
    m_classid = classid;
    m_RxTime=RxTime;
}

StudentInfo::~StudentInfo()
{

}

void StudentInfo::updateStudentInfo(const StudentInfo &info)
{
    m_id = info.getID();
    m_name = info.getName();
    m_classid = info.getclassid();
    m_sex = info.getsex();
    m_xuehao = info.getxuehao();
    m_pswd = info.getpswd();
    m_RxTime =info.getRxTime();
}

void StudentInfo::updateStudentInfo(const QString &id,const QString &name,
                                    const QString &xuehao,const QString &pswd,
                                    const QString &sex,const QString &classid,
                                    const QString &RxTime)
{
    m_id = id;
    m_name = name;
    m_xuehao = xuehao;
    m_pswd = pswd;
    m_sex =sex;
    m_classid = classid;
    m_RxTime =RxTime;
}

void StudentInfo::display() const
{
    qDebug() << "--------------Disp StudentInfo---------------";
    qDebug() << "m_id: " << m_id;
    qDebug() << "m_name: " << m_name;
    qDebug() << "m_xuehao: " << m_xuehao;
    qDebug() << "m_pswd: " <<m_pswd;
    qDebug() << "m_sex: " << m_sex;
    qDebug() << "m_classid: " << m_classid;
    qDebug() << "m_RxTime: " <<m_RxTime;
    qDebug() << "--------------StudentInfo End----------------";
}


void StudentInfo::setID(const QString &id)
{
    m_id = id;
}

const QString &StudentInfo::getID() const
{
    return m_id;
}

void StudentInfo::setName(const QString &name)
{
    m_name = name;
}

const QString &StudentInfo::getName() const
{
    return m_name;
}

void StudentInfo::setxuehao(const QString &xuehao)
{
    m_xuehao = xuehao;
}

const QString &StudentInfo::getxuehao() const
{
    return m_xuehao;
}

void StudentInfo::setpswd(const QString &pswd)
{
    m_pswd = pswd;
}
const QString &StudentInfo::getpswd() const
{
    return m_pswd;
}

void StudentInfo::setsex(const QString &sex)
{
    m_sex = sex;
}
const QString &StudentInfo::getsex() const
{
    return m_sex;
}

void StudentInfo::setclassid(const QString &classid)
{
    m_classid = classid;
}
const QString &StudentInfo::getclassid() const
{
    return m_classid;
}

void StudentInfo::setRxTime(const QString &RxTime)
{
    m_RxTime = RxTime;
}

const QString &StudentInfo::getRxTime() const
{
    return m_RxTime;
}
